#!/usr/bin/env python3
"""
GraphRAG Web服务器启动脚本
"""

import uvicorn
from pathlib import Path
import sys
import os

# 添加当前目录到Python路径
sys.path.insert(0, str(Path(__file__).parent))

if __name__ == "__main__":
    print("启动GraphRAG Web服务器...")
    print("访问地址: http://localhost:8000")
    print("API文档: http://localhost:8000/docs")
    
    # 启动FastAPI应用
    uvicorn.run(
        "demo_fastapi:app",
        host="0.0.0.0",
        port=8000,
        reload=True,  # 开发模式下启用热重载
        log_level="info"
    ) 